package com.example.task;

import com.example.service.ProductionRecordService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


@Component
@RequiredArgsConstructor
public class DataImporterXxlJob {

    private static final Logger log = LoggerFactory.getLogger(DataImporterXxlJob.class);

    private final ProductionRecordService productionRecordService;

    // 生产进度表数据导入
    @XxlJob("dataImporterHandler")
    public void deGarProdProgressImportXxlJob() throws Exception {
        log.info("开始执行生产进度表数导入");
        productionRecordService.ProductionDetailImport();
        log.info("生产进度表数导入完成");
//        System.out.println("-------------");
    }
}
